<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<html>
<head>
</head>

<body>
    <table class="tborder" cellspacing="1" cellpadding="3" border="0" width="100%">
        <caption>messages</caption>
        <thead>
            <tr>
                <th>Sender</th>
                <th>Subject</th>
                <th>Content</th>
                <th>Createdate</th>
            </tr>
        </thead>
        <tbody>
            <c:if test="${not empty messages}">
            <c:forEach var="message" items="${messages}">
            <tr id="${message.id}">
                <td>${message.sender.usnername}</td>
                <td>${message.subject}</td>
                <td>${message.summary}</td>
                <td>
                    <span>
                        <fmt:formatDate value="${message.createdate.time}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </span>
                </td>
            </tr>
            </c:forEach>
            </c:if>
        </tbody>
    </table>
</body>
</html>